#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=1e9+7;
const int N=2e5+5;
int n,a[N];
multiset<int> s;
/*struct treemx{
    ll tree1[N*4];
    void init(){
        memset(tree1,0,sizeof(tree1));}
    void pushup(ll rt){
        tree1[rt]=max(tree1[rt<<1],tree1[rt<<1|1]);}
    void build(ll l,ll r,ll rt){
        if(l==r){
            tree1[rt]=a[l];
            return ;}
        ll mid=(l+r)>>1;
        build(l,mid,rt<<1);
        build(mid+1,r,rt<<1|1);
        pushup(rt);}
    void update(ll l,ll r,ll rt,ll p,ll c){
        if(l==r){
            tree1[rt]=max(tree1[rt],c);
            return ;}
        ll mid=(l+r)>>1;
        if(p<=mid)update(l,mid,rt<<1,p,c);
        else update(mid+1,r,rt<<1|1,p,c);
        pushup(rt);}
    ll query(ll l,ll r,ll rt,ll L,ll R){
        if(L<=l&&r<=R){
            return tree1[rt];}
        ll mid=(l+r)>>1;
        ll ret=0;
        if(L<=mid)ret=max(ret,query(l,mid,rt<<1,L,R));
        if(R>mid)ret=max(ret,query(mid+1,r,rt<<1|1,L,R));
        return ret;}
};
struct treemn{
    ll tree2[N*4];
    void pushup(ll rt){
        tree2[rt]=min(tree2[rt<<1],tree2[rt<<1|1]);}
    void build(ll l,ll r,ll rt){
        if(l==r){
            tree2[rt]=a[l];    //you need to change if it should be maxn
            return ;}
        ll mid=(l+r)>>1;
        build(l,mid,rt<<1);
        build(mid+1,r,rt<<1|1);
        pushup(rt);}
    void init(){
        memset(tree2,0,sizeof(tree2));
        build(1,n,1);}
    void update(ll l,ll r,ll rt,ll p,ll c){
        if(l==r){
            tree2[rt]=min(tree2[rt],c);
            return ;}
        ll mid=(l+r)>>1;
        if(p<=mid)update(l,mid,rt<<1,p,c);
        else update(mid+1,r,rt<<1|1,p,c);
        pushup(rt);}
    ll query(ll l,ll r,ll rt,ll L,ll R){
        if(L<=l&&r<=R){
            return tree2[rt];}
        ll mid=(l+r)>>1;
        ll ret=maxn;
        if(L<=mid)ret=min(ret,query(l,mid,rt<<1,L,R));
        if(R>mid)ret=min(ret,query(mid+1,r,rt<<1|1,L,R));
        return ret;}
};
struct getsum{
    ll sum1[N],sum2[N],d[N];
    void init(){
        memset(sum1,0,sizeof(sum1));
        memset(sum2,0,sizeof(sum2));
        memset(d,0,sizeof(d));
        for(int i=1;i<=n;i++){
            d[i]=a[i]-a[i-1];
            update(i,d[i]);}}
    ll lowbit(ll xx){
        return xx&(-xx);}
    void update(ll pp,ll cc){
        for(int i=pp;i<=n;i+=lowbit(i)){
            sum1[i]+=cc;
            sum2[i]+=cc*pp;}}
    void range_update(ll l,ll r,ll cc){
        update(l,cc);
        update(r+1,-cc);}
    ll query(ll pp){
        ll ret=0;
        for(int i=pp;i>0;i-=lowbit(i)){
            ret+=sum1[i]*(pp+1)-sum2[i];}
        return ret;}
    ll range_query(ll l,ll r){
        return query(r)-query(l-1);}
};*/
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    scanf("%d",&n);
    for(int i=1;i<=n;i++){
        scanf("%d",&a[i]);
        s.insert(a[i]);}
    s.insert(maxn);
    sort(a+1,a+n+1);
    int ans=n;
    for(int i=1;i<=n;i++){
        auto ii=s.upper_bound(a[i]);
        if(*ii==maxn)continue;
        s.erase(ii);
        ans--;}
    printf("%d\n",ans);
    return 0;
}